import { View, StyleSheet} from 'react-native'
import React from 'react'
import { StatusBar } from 'expo-status-bar'
import UIConstants from '../constants/UIConstants'
import { SafeAreaView } from 'react-native-safe-area-context'


export default function ZhPage({children,bgColor=UIConstants.COLOR_GRAY_LIGHT}) {
    return (
        <View style={[ss.bg,{backgroundColor:bgColor}]}>
            {/**给组件设置复合样式，让调用方自定义修改某个参数backgroundColor */} 
            {/**顶部状态栏 */}
            <StatusBar backgroundColor={UIConstants.COLOR_GREEN} style='light'/>
            {/** style='light'识别ios端*/}
            {/*屏幕安全区域 */}
            <SafeAreaView>
                {children}
            </SafeAreaView>
        </View>
    )
}


let ss =StyleSheet.create({
    bg:{
        width:'100%',
        flex:1,   //此处的作用类似于height：100%
    }
})